a312e91c52eb8ad5fbb118aed03554e973284f34,onebusaway-nyc-presentation/src/main/java/org/onebusaway/nyc/presentation/impl/realtime/SiriSupport.java,SiriSupport,getOnwardCallStructure,#StopBean#PresentationService#number#number#number#number#SiriSupportPredictionTimepointRecord#number#,516
Before Change
if(prediction != null) {
if (prediction.getTimepointPredictionRecord().getTimepointPredictedTime() < responseTimestamp) {
onwardCallStructure.setExpectedArrivalTime(new Date(responseTimestamp));
onwardCallStructure.setExpectedDepartureTime(new Date(responseTimestamp));
} else {
onwardCallStructure.setExpectedArrivalTime(new Date(prediction.getTimepointPredictionRecord().getTimepointPredictedTime()));
onwardCallStructure.setExpectedDepartureTime(new Date(prediction.getTimepointPredictionRecord().getTimepointPredictedTime()));
After Change
stopPoint.setValue(stopBean.getName());
onwardCallStructure.setStopPointName(stopPoint);
boolean isNearFirstStop = false;
if (distanceOfCallAlongTrip < 100) isNearFirstStop = true;
if(prediction != null) {
if (prediction.getTimepointPredictionRecord().getTimepointPredictedTime() < responseTimestamp) {
if (!isNearFirstStop) { onwardCallStructure.setExpectedArrivalTime(new Date(responseTimestamp));}
else {
onwardCallStructure.setExpectedDepartureTime(new Date(responseTimestamp));
}
} else {
if (!isNearFirstStop) { onwardCallStructure.setExpectedArrivalTime(new Date(prediction.getTimepointPredictionRecord().getTimepointPredictedTime()));}